docs: remove stray err handling in examples and enable lint rule#11556
Merged
docs: remove stray err handling in examples and enable lint rule#11556
err handling in examples and enable lint rule#11556Conversation
…create-int64 The @example block and README C example referenced an err variable that stdlib_napi_create_int64 never produces; the native test also compared the returned BigInt to a Number via strictEqual.
…ia Number in napi/create-uint64 The @example block and README C example referenced an err variable that stdlib_napi_create_uint64 never produces; added the missing C API note that the generated JavaScript value is a BigInt (matching create-int64); the native test compared the returned BigInt to a Number via strictEqual.
…es block Matches the convention used across every other @stdlib/ndarray top-level README.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
d536608 to
3b18bd6
Compare
develop on 2026-04-18err handling and fix BigInt tests in napi/create-int64 and napi/create-uint64
kgryte
reviewed
Apr 19, 2026
kgryte
reviewed
Apr 19, 2026
…api/create-uint64 native tests The lib/native.js wrapper already coerces the addon return value via Number(), so the prior strictEqual was sound. Drop the redundant Number() coercion and the unused @stdlib/number/ctor import.
kgryte
approved these changes
Apr 19, 2026
err handling and fix BigInt tests in napi/create-int64 and napi/create-uint64err handling in examples and enable lint rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
developon 2026-04-18 (SHA range3af178cc07..414d61b8ad).napi/create-int64(0c116e3d): drop theif ( err != NULL ) { napi_throw(...); }block from the@exampleand README — it was copy-pasted fromargv-int64and references an undeclarederrthatstdlib_napi_create_int64never produces; coerce the BigInt return viaNumber()intest.native.jssostrictEqualno longer fails on5n === 5.napi/create-uint64(0c116e3d): same strayerr-block removal in the@exampleand README, add the "generated JavaScript value is aBigInt" note to the C APInotessection to match the siblingcreate-int64, and coerce the BigInt return viaNumber()intest.native.jsfor the same reason as above.ndarray/colcat(648e90d0): add the missing<!-- eslint no-undef: "error" -->directive before the Examples code fence; every other@stdlib/ndarraytop-level README uses it.Related Issues
None.
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
PR authored by Claude Code: sub-agents reviewed the 24-hour commit window on
develop; main agent validated each finding and applied the fixes.@stdlib-js/reviewers